/**
 * @author CH_ywx
 * @Date 2023-05-26
 * @Description
 */
package io.xccit.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.xccit.enums.Sex;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
@TableName("t_user") //指定表名
public class User {
//    @TableId(value = "id",type = IdType.AUTO) //指定主键字段及生成策略
    @TableId("id") //指定主键字段
    private Long uid;
    @TableField("name") //指定实体类字段对应表中的哪个字段
    private String name;
    private Integer age;
    private String email;
    private Sex sex;
    @TableLogic
    private Integer isDeleted;

    public User(String name, Integer age, String email) {
        this.name = name;
        this.age = age;
        this.email = email;
    }
    public User(String name, Integer age, String email,Sex sex) {
        this.name = name;
        this.age = age;
        this.email = email;
        this.sex = sex;
    }
    public User(Long uid, String name, Integer age, String email) {
        this.uid = uid;
        this.name = name;
        this.age = age;
        this.email = email;
    }
}
